﻿using System;
using System.Globalization;
using System.Linq;
using System.Windows.Forms;

namespace EnumLocalizer.Forms
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1Load(object sender, EventArgs e)
        {
            this.comboBox1.DataSource = Languages.CultureInfos;
        }

        private void ComboBox1SelectedIndexChanged(object sender, EventArgs e)
        {
            System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo(this.comboBox1.SelectedValue.ToString());

            this.dataGridView1.DataSource = new Yama.Util.EnumLocalizer<Digits>().GetValueNamePairs().ToList();
        }
    }
}
